#include"processbar.h"

typedef void (*callback)(int);//函数指针类型

void download(callback cb)
{
  int total =1000;
  int cur = 0;
  while(cur<=total)
  {
    int rate = cur*100/total;
    cur+=10;
    cb(rate);
    //pocessbar2(rate);
  usleep(50000);
  }
printf("\n");

}


int main()
{
//  processbar(20000);
  download(processbar2);
//    processbar2(20);
  return 0;
}

